#include<bits/stdc++.h>

using namespace std;

signed main() {
    int N;
    cin >> N;
    int a[N];
    for (int i = 0; i < N; ++i) {
        cin >> a[i];
    }
    int count = 0;
    int p = 0;
    for (int i = 0; i < N; ++i) {
        int op = a[i] - p;
        if (op > 0) {
            count++;
        }
        p = a[i];
    }
    cout << count << endl;
    return 0;